package com.mrobuy.jd;

import com.gavel.parser.SkuItem;
import com.mrobuy.jdvc.entity.Item;

import java.util.List;

public class IntroBuilder {


    /**
     *  PC端 详情信息HTML
     *
     * @return
     */
    public static String buildPCIntroHtml(SkuItem spuItem, List<Item> items) {
        return "<style>.ssd-module-wrap {\n" +
                "        position: relative;\n" +
                "        margin: 0 auto;\n" +
                "        width: 750px;\n" +
                "        text-align: left;\n" +
                "        background-color: #fff\n" +
                "    }\n" +
                "\n" +
                "    .ssd-module-wrap .ssd-module, .ssd-module-wrap .ssd-module-heading {\n" +
                "        width: 750px;\n" +
                "        position: relative;\n" +
                "        overflow: hidden\n" +
                "    }\n" +
                "\n" +
                "    .ssd-module-wrap .ssd-module {\n" +
                "        background-repeat: no-repeat;\n" +
                "        background-position: left top;\n" +
                "        background-size: 100% 100%\n" +
                "    }\n" +
                "\n" +
                "    .ssd-module-wrap .ssd-module-heading {\n" +
                "        background-repeat: no-repeat;\n" +
                "        background-position: left center;\n" +
                "        background-size: 100% 100%\n" +
                "    }\n" +
                "\n" +
                "    .ssd-module-wrap .ssd-module-heading .ssd-module-heading-layout {\n" +
                "        display: inline-block\n" +
                "    }\n" +
                "\n" +
                "    .ssd-module-wrap .ssd-module-heading .ssd-widget-heading {\n" +
                "        font-style: normal;\n" +
                "        font-family: microsoft yahei;\n" +
                "        line-height: 30px;\n" +
                "        text-decoration: none;\n" +
                "        letter-spacing: 0px;\n" +
                "        font-weight: normal;\n" +
                "        color: #ffffff;\n" +
                "        background-color: transparent;\n" +
                "        float: left;\n" +
                "        display: inline-block;\n" +
                "        height: 100%\n" +
                "    }\n" +
                "\n" +
                "    .ssd-module-wrap .ssd-widget-text {\n" +
                "        position: absolute;\n" +
                "        overflow: hidden\n" +
                "    }\n" +
                "\n" +
                "    .ssd-module-wrap .ssd-widget-text {\n" +
                "        line-height: 1.5;\n" +
                "        word-break: break-all\n" +
                "    }\n" +
                "\n" +
                "    .ssd-module-wrap .ssd-widget-text span {\n" +
                "        display: block;\n" +
                "        overflow: hidden;\n" +
                "        width: 100%;\n" +
                "        height: 100%;\n" +
                "        padding: 0;\n" +
                "        margin: 0;\n" +
                "        word-break: break-all;\n" +
                "        word-wrap: break-word;\n" +
                "        white-space: normal\n" +
                "    }\n" +
                "\n" +
                "    .ssd-module-wrap .title {\n" +
                "        width: 750px;\n" +
                "        background-color: transparent;\n" +
                "        background-image: url(http://img30.360buyimg.com/sku/jfs/t2467/315/1479078334/2361/4757d7d6/566010f4N01f5d17a.png);\n" +
                "        height: 30px;\n" +
                "        text-align: left\n" +
                "    }\n" +
                "\n" +
                "    .ssd-module-wrap .title-ch {\n" +
                "        margin: 0 6px 0 15px;\n" +
                "        font-size: 14px\n" +
                "    }\n" +
                "\n" +
                "    .ssd-module-wrap .title-en {\n" +
                "        margin: 0 15px 0 6px;\n" +
                "        font-size: 12px\n" +
                "    }\n" +
                "\n" +
                "    .ssd-module-wrap .content {\n" +
                "        width: 750px;\n" +
                "        background-color: #F7F3F3;\n" +
                "        background-size: 100% auto;\n" +
                "        height: 180px\n" +
                "    }\n" +
                "\n" +
                "    .ssd-module-wrap .content-text {\n" +
                "        z-index: 0;\n" +
                "        color: #000000;\n" +
                "        font-weight: normal;\n" +
                "        letter-spacing: 0px;\n" +
                "        text-decoration: none;\n" +
                "        font-size: 14px;\n" +
                "        line-height: 1.5;\n" +
                "        font-style: normal;\n" +
                "        background-color: transparent;\n" +
                "        top: 16px;\n" +
                "        left: 42px;\n" +
                "        width: 200px;\n" +
                "        font-family: microsoft yahei;\n" +
                "        min-height: 110px\n" +
                "    }\n" +
                "\n" +
                "    .ssd-module-wrap img {\n" +
                "        width: 750px;\n" +
                "        background-size: 100% 100%;\n" +
                "        height: 750px;\n" +
                "    }\n" +
                "\n" +
                "    table {\n" +
                "        border-collapse: collapse;\n" +
                "        margin: 0 auto;\n" +
                "        text-align: center;\n" +
                "    }\n" +
                "\n" +
                "    table tbody {\n" +
                "        display: block;\n" +
                "        max-height: 600px;\n" +
                "        overflow-y: scroll;\n" +
                "    }\n" +
                "\n" +
                "    table thead, tbody tr {\n" +
                "        display: table;\n" +
                "        width: 710px;\n" +
                "        table-layout: fixed;\n" +
                "    }\n" +
                "\n" +
                "    table thead {\n" +
                "        width: 750px;\n" +
                "    }\n" +
                "\n" +
                "    table td, table th {\n" +
                "        border: 1px solid #cad9ea;\n" +
                "        color: #666;\n" +
                "        height: 30px;\n" +
                "    }\n" +
                "\n" +
                "    table thead th {\n" +
                "        background-color: #e6e6e6;\n" +
                "    }\n" +
                "\n" +
                "    table tr:nth-child(odd) {\n" +
                "        background: #fff;\n" +
                "    }\n" +
                "\n" +
                "    table tr:nth-child(even) {\n" +
                "        background: #F5FAFA;\n" +
                "    }\n" +
                "\n" +
                "    .productcode {\n" +
                "        width: 200px;\n" +
                "    }\n" +
                "    </style>\n" +
                "    <div class=\"ssd-module-wrap\">\n" +
                "        <div class=\"ssd-module-heading title\">\n" +
                "            <div class=\"ssd-module-heading-layout\">\n" +
                "                <span class=\"ssd-widget-heading title-ch\">产品信息</span>\n" +
                "                <span class=\"ssd-widget-heading title-en\">Product Description</span>\n" +
                "            </div>\n" +
                "        </div>\n" +
                "        <div class=\"ssd-module content\">\n" +
                "            <div class=\"ssd-widget-text content-text\">\n" +
                spuItem.getIntro() +
                "            </div>\n" +
                "        </div>\n" +
                "        <div>\n" +
                "            <table>\n" +
                "                <thead class=\"thead-dark\">\n" +
                "                <tr>\n" +
                "                    <th class=\"productcode\">型号</th>\n" +
                "                    <th>磨头外径(mm)</th>\n" +
                "                    <th>柄径(mm/inch)</th>\n" +
                "                    <th>最高转速(rpm)</th>\n" +
                "                    <th style=\"width:35px;\"></th>\n" +
                "                </tr>\n" +
                "                </thead>\n" +
                "                <tbody>\n" +
                "                <tr>\n" +
                "                    <td class=\"productcode\">309磨料，100*25*6.35，60#-100</td>\n" +
                "                    <td>100</td>\n" +
                "                    <td>6.35</td>\n" +
                "                    <td>15300</td>\n" +
                "                </tr>\n" +
                "                <tr>\n" +
                "                    <td class=\"productcode\">309磨料，100*25*6.35，80#-100</td>\n" +
                "                    <td>100</td>\n" +
                "                    <td>6.35</td>\n" +
                "                    <td>15300</td>\n" +
                "                </tr>\n" +
                "                <tr>\n" +
                "                    <td class=\"productcode\">309磨料，100*25*6.35，100#-100</td>\n" +
                "                    <td>100</td>\n" +
                "                    <td>6.35</td>\n" +
                "                    <td>15300</td>\n" +
                "                </tr>\n" +
                "                <tr>\n" +
                "                    <td class=\"productcode\">309磨料，100*25*6.35，120#-100</td>\n" +
                "                    <td>100</td>\n" +
                "                    <td>6.35</td>\n" +
                "                    <td>15300</td>\n" +
                "                </tr>\n" +
                "                <tr>\n" +
                "                    <td class=\"productcode\">309磨料，100*25*6.35，150#-100</td>\n" +
                "                    <td>100</td>\n" +
                "                    <td>6.35</td>\n" +
                "                    <td>15300</td>\n" +
                "                </tr>\n" +
                "                <tr>\n" +
                "                    <td class=\"productcode\">309磨料，100*25*6.35，180#-100</td>\n" +
                "                    <td>100</td>\n" +
                "                    <td>6.35</td>\n" +
                "                    <td>15300</td>\n" +
                "                </tr>\n" +
                "                <tr>\n" +
                "                    <td class=\"productcode\">309磨料，100*25*6.35，220#-100</td>\n" +
                "                    <td>100</td>\n" +
                "                    <td>6.35</td>\n" +
                "                    <td>15300</td>\n" +
                "                </tr>\n" +
                "                <tr>\n" +
                "                    <td class=\"productcode\">309磨料，100*25*6.35，240#-100</td>\n" +
                "                    <td>100</td>\n" +
                "                    <td>6.35</td>\n" +
                "                    <td>15300</td>\n" +
                "                </tr>\n" +
                "                <tr>\n" +
                "                    <td class=\"productcode\">309磨料，100*25*6.35，320#-100</td>\n" +
                "                    <td>100</td>\n" +
                "                    <td>6.35</td>\n" +
                "                    <td>15300</td>\n" +
                "                </tr>\n" +
                "                </tbody>\n" +
                "            </table>\n" +
                "        </div>\n" +
                "        <div>\n" +
                "            <img src=\"http://img20.360buyimg.com/vc/jfs/t1/154990/22/7391/65780/5fbf05b4E889ed73c/083b5dc3245c363b.jpg\"/>\n" +
                "        </div>\n" +
                "    </div>\n" +
                "</div>";
    }

    /**
     *  移动端 详情信息HTML
     *
     * @return
     */
    public static String buildMobileIntroHtml(SkuItem spuItem, List<Item> items) {
        return "<style>.ssd-module-mobile-wrap {\n" +
                "    position: relative;\n" +
                "    margin: 0 auto;\n" +
                "    width: 750px;\n" +
                "    text-align: left;\n" +
                "    background-color: #fff\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-module, .ssd-module-mobile-wrap .ssd-module-heading {\n" +
                "    width: 750px;\n" +
                "    position: relative;\n" +
                "    overflow: hidden\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-floor-activity {\n" +
                "    max-height: 380px;\n" +
                "    overflow: hidden\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-floor-shopPrior {\n" +
                "    max-height: 900px;\n" +
                "    overflow: hidden\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-floor-authorize {\n" +
                "    max-height: 300px;\n" +
                "    overflow: hidden\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-floor-reminder {\n" +
                "    max-height: 4000px;\n" +
                "    overflow: hidden\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-module {\n" +
                "    background-repeat: no-repeat;\n" +
                "    background-position: left top;\n" +
                "    background-size: 100% 100%\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-module-heading {\n" +
                "    background-repeat: no-repeat;\n" +
                "    background-position: left center;\n" +
                "    background-size: 100% 100%\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-module-heading .ssd-module-heading-layout {\n" +
                "    display: inline-block\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-module-heading .ssd-widget-heading-ch {\n" +
                "    float: left;\n" +
                "    display: inline-block;\n" +
                "    margin: 0 6px 0 15px;\n" +
                "    height: 100%\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-module-heading .ssd-widget-heading-en {\n" +
                "    float: left;\n" +
                "    display: inline-block;\n" +
                "    margin: 0 15px 0 6px;\n" +
                "    height: 100%\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-widget-circle, .ssd-module-mobile-wrap .ssd-widget-line, .ssd-module-mobile-wrap .ssd-widget-pic, .ssd-module-mobile-wrap .ssd-widget-rectangle, .ssd-module-mobile-wrap .ssd-widget-table, .ssd-module-mobile-wrap .ssd-widget-text, .ssd-module-mobile-wrap .ssd-widget-triangle {\n" +
                "    position: absolute;\n" +
                "    overflow: hidden\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-widget-rectangle {\n" +
                "    box-sizing: border-box;\n" +
                "    -moz-box-sizing: border-box;\n" +
                "    -webkit-box-sizing: border-box\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-widget-triangle svg {\n" +
                "    width: 100%;\n" +
                "    height: 100%\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-widget-table table {\n" +
                "    width: 100%;\n" +
                "    height: 100%\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-widget-table td {\n" +
                "    position: relative;\n" +
                "    white-space: pre-line;\n" +
                "    word-break: break-all\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-widget-pic img {\n" +
                "    display: block;\n" +
                "    width: 100% !important;\n" +
                "    height: 100% !important\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-widget-text {\n" +
                "    line-height: 1.5;\n" +
                "    word-break: break-all\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-widget-text span {\n" +
                "    display: block;\n" +
                "    overflow: hidden;\n" +
                "    width: 100%;\n" +
                "    height: 100%;\n" +
                "    padding: 0;\n" +
                "    margin: 0;\n" +
                "    word-break: break-all;\n" +
                "    word-wrap: break-word;\n" +
                "    white-space: normal\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-widget-link {\n" +
                "    position: absolute;\n" +
                "    left: 0;\n" +
                "    top: 0;\n" +
                "    width: 100%;\n" +
                "    height: 100%;\n" +
                "    background: 0 0;\n" +
                "    z-index: 100\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-cell-text {\n" +
                "    position: absolute;\n" +
                "    top: 0;\n" +
                "    left: 0;\n" +
                "    right: 0;\n" +
                "    width: 100%;\n" +
                "    height: 100%;\n" +
                "    overflow: auto\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-show {\n" +
                "    display: block\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-hide {\n" +
                "    display: none\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .M16043306301141 {\n" +
                "    background-color: transparent;\n" +
                "    width: 100.00%;\n" +
                "    line-height: 30px;\n" +
                "    background-image: url(http://img30.360buyimg.com/sku/jfs/t2467/315/1479078334/2361/4757d7d6/566010f4N01f5d17a.png);\n" +
                "    height: 30px;\n" +
                "    text-align: left\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .W16043306301141I0 {\n" +
                "    background-color: transparent;\n" +
                "    color: #ffffff;\n" +
                "    font-weight: normal;\n" +
                "    letter-spacing: 0px;\n" +
                "    text-decoration: none;\n" +
                "    font-size: 20px;\n" +
                "    line-height: 30px;\n" +
                "    font-family: microsoft yahei;\n" +
                "    font-style: normal;\n" +
                "    height: 30px\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .W16043306301141I1 {\n" +
                "    background-color: transparent;\n" +
                "    color: #ffffff;\n" +
                "    font-weight: normal;\n" +
                "    letter-spacing: 0px;\n" +
                "    text-decoration: none;\n" +
                "    font-size: 18px;\n" +
                "    line-height: 30px;\n" +
                "    font-family: microsoft yahei;\n" +
                "    font-style: normal;\n" +
                "    height: 30px\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .M16043306301362 {\n" +
                "    width: 100.00%;\n" +
                "    background-color: #f2f2f2;\n" +
                "    background-size: 100% auto;\n" +
                "    height: 192px\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .W16043306301362I0 {\n" +
                "    rotate: 0;\n" +
                "    z-index: 0;\n" +
                "    color: #000000;\n" +
                "    font-weight: normal;\n" +
                "    letter-spacing: 0px;\n" +
                "    text-decoration: none;\n" +
                "    font-size: 20px;\n" +
                "    line-height: 1.5;\n" +
                "    font-style: normal;\n" +
                "    background-color: transparent;\n" +
                "    top: 8.25%;\n" +
                "    left: 3.07%;\n" +
                "    width: 92.53%;\n" +
                "    font-family: microsoft yahei;\n" +
                "    height: 153px\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .img {\n" +
                "    width: 100.00%;\n" +
                "    background-color: #e9e9e9;\n" +
                "    background-size: 100% 100%;\n" +
                "    height: 750px\n" +
                "}\n" +
                "\n" +
                "table {\n" +
                "    border-collapse: collapse;\n" +
                "    margin: 0 auto;\n" +
                "    text-align: center;\n" +
                "}\n" +
                "\n" +
                "table tbody {\n" +
                "    display: block;\n" +
                "    max-height: 600px;\n" +
                "    overflow-y: scroll;\n" +
                "}\n" +
                "\n" +
                "table thead, tbody tr {\n" +
                "    display: table;\n" +
                "    width: 710px;\n" +
                "    table-layout: fixed;\n" +
                "}\n" +
                "\n" +
                "table thead {\n" +
                "    width: 750px;\n" +
                "}\n" +
                "\n" +
                "table td, table th {\n" +
                "    border: 1px solid #cad9ea;\n" +
                "    color: #666;\n" +
                "    height: 30px;\n" +
                "}\n" +
                "\n" +
                "table thead th {\n" +
                "    background-color: #e6e6e6;\n" +
                "}\n" +
                "\n" +
                "table tr:nth-child(odd) {\n" +
                "    background: #fff;\n" +
                "}\n" +
                "\n" +
                "table tr:nth-child(even) {\n" +
                "    background: #F5FAFA;\n" +
                "}\n" +
                "\n" +
                ".productcode {\n" +
                "    width: 200px;\n" +
                "}</style>\n" +
                "<div cssurl=\"//sku-market-gw.jd.com/css/mobile/100009403625.css?t=1605489928974\"></div>\n" +
                "<div id=\"zbViewModulesH\" value=\"972\"></div>\n" +
                "<input id=\"zbViewModulesHeight\" type=\"hidden\" value=\"972\"/>\n" +
                "<div skudesign=\"100011\"></div>\n" +
                "<div class=\"ssd-module-mobile-wrap\">\n" +
                "    <div class=\"ssd-module ssd-module-heading M16043306301141\" id=\"detail-tag-id-424159\" name=\"detail-tag-id-424159\"\n" +
                "         text=\"产品信息\">\n" +
                "        <div class=\"ssd-module-heading-layout\">\n" +
                "            <span class=\"ssd-widget-heading-ch W16043306301141I0\">产品信息</span>\n" +
                "            <span class=\"ssd-widget-heading-en W16043306301141I1\">Product Description</span>\n" +
                "        </div>\n" +
                "    </div>\n" +
                "    <div class=\"ssd-module M16043306301362\" data-id=\"M16043306301362\">\n" +
                "        <div class=\"ssd-widget-text W16043306301362I0\">\n" +
                spuItem.getIntro() +
                "        </div>\n" +
                "    </div>\n" +
                "    <div>\n" +
                "        <table>\n" +
                "            <thead class=\"thead-dark\">\n" +
                "            <tr>\n" +
                "                <th class=\"productcode\">型号</th>\n" +
                "                <th>磨头外径(mm)</th>\n" +
                "                <th>柄径(mm/inch)</th>\n" +
                "                <th>最高转速(rpm)</th>\n" +
                "                <th style=\"width:35px;\"></th>\n" +
                "            </tr>\n" +
                "            </thead>\n" +
                "            <tbody>\n" +
                "            <tr>\n" +
                "                <td class=\"productcode\">309磨料，100*25*6.35，60#-100</td>\n" +
                "                <td>100</td>\n" +
                "                <td>6.35</td>\n" +
                "                <td>15300</td>\n" +
                "            </tr>\n" +
                "            <tr>\n" +
                "                <td class=\"productcode\">309磨料，100*25*6.35，80#-100</td>\n" +
                "                <td>100</td>\n" +
                "                <td>6.35</td>\n" +
                "                <td>15300</td>\n" +
                "            </tr>\n" +
                "            <tr>\n" +
                "                <td class=\"productcode\">309磨料，100*25*6.35，100#-100</td>\n" +
                "                <td>100</td>\n" +
                "                <td>6.35</td>\n" +
                "                <td>15300</td>\n" +
                "            </tr>\n" +
                "            <tr>\n" +
                "                <td class=\"productcode\">309磨料，100*25*6.35，120#-100</td>\n" +
                "                <td>100</td>\n" +
                "                <td>6.35</td>\n" +
                "                <td>15300</td>\n" +
                "            </tr>\n" +
                "            <tr>\n" +
                "                <td class=\"productcode\">309磨料，100*25*6.35，150#-100</td>\n" +
                "                <td>100</td>\n" +
                "                <td>6.35</td>\n" +
                "                <td>15300</td>\n" +
                "            </tr>\n" +
                "            <tr>\n" +
                "                <td class=\"productcode\">309磨料，100*25*6.35，180#-100</td>\n" +
                "                <td>100</td>\n" +
                "                <td>6.35</td>\n" +
                "                <td>15300</td>\n" +
                "            </tr>\n" +
                "            <tr>\n" +
                "                <td class=\"productcode\">309磨料，100*25*6.35，220#-100</td>\n" +
                "                <td>100</td>\n" +
                "                <td>6.35</td>\n" +
                "                <td>15300</td>\n" +
                "            </tr>\n" +
                "            <tr>\n" +
                "                <td class=\"productcode\">309磨料，100*25*6.35，240#-100</td>\n" +
                "                <td>100</td>\n" +
                "                <td>6.35</td>\n" +
                "                <td>15300</td>\n" +
                "            </tr>\n" +
                "            <tr>\n" +
                "                <td class=\"productcode\">309磨料，100*25*6.35，320#-100</td>\n" +
                "                <td>100</td>\n" +
                "                <td>6.35</td>\n" +
                "                <td>15300</td>\n" +
                "            </tr>\n" +
                "            </tbody>\n" +
                "        </table>\n" +
                "    </div>\n" +
                "    <div class=\"ssd-module img\" data-id=\"img\">\n" +
                "        <img src=\"http://img20.360buyimg.com/vc/jfs/t1/154990/22/7391/65780/5fbf05b4E889ed73c/083b5dc3245c363b.jpg\"/>\n" +
                "    </div>\n" +
                "</div>";
    }


}
